package com.meilishuo.message.entity.common;

/**
 *  * The input interface of a paging query.
 * 
 * @author binbinshen
 *
 * @param <T>
 */
public class PageForm<T> extends BasicPageForm {
	
	public void setPage(int page) {
		super.setPageNumber(page);
	}
	

	public void setRows(int rows) {
		super.setPageSize(rows);
	}
	// The name of the sorted field
	private String sortFieldName;
	// The direction of the sorted field
	private String sortDir;
	// The query string
	private String query;

	// the entity which contains the parameters
	private T queryParams;

	public String getSortFieldName() {
		return sortFieldName;
	}

	public void setSortFieldName(String sortFieldName) {
		this.sortFieldName = sortFieldName;
	}

	public String getSortDir() {
		return sortDir;
	}

	public void setSortDir(String sortDir) {
		this.sortDir = sortDir;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public T getQueryParams() {
		return queryParams;
	
	}

	public void setQueryParams(T queryParams) {
		this.queryParams = queryParams;
	}
	/**
	 * Sort direction
	 * @author jianli
	 *
	 */
	public enum SortDirection {
		ASC, DESC
	}
}
